/**
    Copyright (c) 2010 yakiimo02
    Distributed under the New BSD License.
    See included license.txt or http://www.yakiimo3d.com/NewBSDLicense.txt
**/

#pragma once

#include <vector>

typedef D3DXVECTOR4 BufType;

typedef std::vector< BufType > BufTypeVector;

/**
    @brief  DataBuffer.
    @author yakiimo02
    @date    2010/01/09
*/
class DataBuffer
{
public:
    DataBuffer();
    ~DataBuffer();

    void Create( int nWidth, int nHeight );
    void Destroy();

    inline int        GetWidth() const { return m_nWidth; }
    inline int        GetHeight() const { return m_nHeight; }
    inline BufType*    GetpData() { return &m_data[ 0 ]; } 

protected:
    int                        m_nWidth;
    int                        m_nHeight;
    BufTypeVector            m_data;
};
